<script lang="ts" setup>
import { computed } from 'vue';
import type { CouponScene } from '@/types/coupon';
import { getSceneName } from '@/utils/coupon';

const props = defineProps<{
  scene: CouponScene;
  disabled: boolean;
}>();

const iconPath = computed(() => {
  const sceneName = getSceneName(props.scene!);
  return `/static/icon_coupon_${sceneName}${props.disabled ? '_disabled' : ''}.png`;
});
</script>

<template>
  <image :src="iconPath" class="apt-coupon-icon"></image>
</template>

<style>
.apt-coupon-icon {
  width: 68rpx;
  height: 68rpx;
}
</style>
